package com.pronosticnews.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.pronosticnews.shared.model.SportDto;

public class SelectedSportEvent extends GwtEvent<SelectedSportEventHandler> {
	public static Type<SelectedSportEventHandler> TYPE = new Type<SelectedSportEventHandler>();
	
	private SportDto sportSelected;

	public SelectedSportEvent(SportDto sportSelected) {
		this.sportSelected = sportSelected;
	}

	@Override
	public Type<SelectedSportEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(SelectedSportEventHandler handler) {
		handler.onSelect(this);
	}

	public SportDto getSportSelected() {
		return sportSelected;
	}
	
}
